<template>
  <div class="answersZsSearchList">
    <template v-if="answersData.data.ztcList.data?.length > 0">
      <p class="answersZsSearchList_p" v-for="item in answersData.data.ztcList.data" :key="item.id">
        <span>●</span>
        <span @click="titleClick(item)">{{ item.title }}</span>
      </p>
    </template>
    <template v-else>
      <p>十分抱歉，暂时未匹配到您的问题，我们会尽快扩充知识库，期待再次为您服务！！！</p>
    </template>

  </div>
</template>

<script>
export default {
  name: "AnswersZsSearchList",
  props: ['answersData'],
  methods: {
    // 点击跳转视频页面
    titleClick ({numberOfPeriods = '',title = '',dataTime = ''} = {}) {
      this.$router.push({
        name: 'PartyBuildingVideoIndex',
        params: {
          data: encodeURIComponent(`${numberOfPeriods},${title},${dataTime}`)
        }
      });
    }
  }
}
</script>
<style type="text/css">
.answersZsSearchList_p {
  color: red;
}

.answersZsSearchList_p span:last-of-type {
  margin-left: 4px;
}
</style>
